package pw_coding

var Mysql2GoMap map[string]string
var MysqlNull2GoMap map[string]string
var Mysql2CSMap map[string]string

func init() {
	Mysql2CSMap = make(map[string]string)
	Mysql2CSMap["bool"] = "bool"
	Mysql2CSMap["varchar"] = "string"
	Mysql2CSMap["longtext"] = "string"
	Mysql2CSMap["text"] = "string"
	Mysql2CSMap["date"] = "DateTime"
	Mysql2CSMap["datetime"] = "DateTime"
	Mysql2CSMap["tinyint"] = "Int16"
	Mysql2CSMap["smallint"] = "Int16"
	Mysql2CSMap["int"] = "Int32"
	Mysql2CSMap["bigint"] = "Int64"
	Mysql2CSMap["decimal"] = "decimal"
	Mysql2CSMap["float"] = "float32"
	Mysql2CSMap["double"] = "double"

	Mysql2GoMap = make(map[string]string)
	Mysql2GoMap["bool"] = "bool"
	Mysql2GoMap["varchar"] = "string"
	Mysql2GoMap["longtext"] = "string"
	Mysql2GoMap["text"] = "string"
	Mysql2GoMap["date"] = "time.Time"
	Mysql2GoMap["datetime"] = "time.Time"
	Mysql2GoMap["tinyint"] = "int8"
	Mysql2GoMap["smallint"] = "int16"
	Mysql2GoMap["int"] = "int32"
	Mysql2GoMap["bigint"] = "int64"
	Mysql2GoMap["decimal"] = "decimal.Decimal"
	Mysql2GoMap["float"] = "float32"
	Mysql2GoMap["double"] = "floa64"

	MysqlNull2GoMap = make(map[string]string)
	MysqlNull2GoMap["bool"] = "sql.NullBool"
	MysqlNull2GoMap["varchar"] = "sql.NullString"
	MysqlNull2GoMap["longtext"] = "sql.NullString"
	MysqlNull2GoMap["text"] = "sql.NullString"
	MysqlNull2GoMap["date"] = "sql.NullTime"
	MysqlNull2GoMap["datetime"] = "sql.NullTime"
	MysqlNull2GoMap["tinyint"] = "int8"
	MysqlNull2GoMap["smallint"] = "sql.NullInt16"
	MysqlNull2GoMap["int"] = "sql.NullInt32"
	MysqlNull2GoMap["bigint"] = "sql.NullInt64"
	MysqlNull2GoMap["decimal"] = "decimal.Decimal"
	MysqlNull2GoMap["float"] = "sql.NullFloat32"
	MysqlNull2GoMap["double"] = "sql.NullFloat64"

}
